home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Medabots Cardz
/
Medabots CD Cardz Metabee.bin
/
pc
/
assets
/
metabee.dxr
/
00068_Script_68
< prev
next >
Wrap
Text File
|
2001-12-07
|
8KB
|
281 lines
property minuteman, tempdigits, tempscore, digit_one, digit_two, digit_three, digit_four, brassurl, tempscoreone, tempscoretwo, tempscorethree
global thescore, finalcode, scoredigits, timescore, gotobrassurl, myFile, squam, oldscore
on beginsprite me
set the floatPrecision = 0
squam = getOSdirectory()&"\"
if objectP(myFile) then set myFile = 0 --Delete the instance if it already exists
myFile = new(xtra "fileio") -- Create an instance of FileIO
-- openFile(myFile,the moviePath&"info.txt",1) --Open the file with read access
openFile(myFile,squam&"infom.txt",1) --Open the file with read access
myVariable = readFile(myFile) --set the variable 'myVariable' to the text of the file 'info.txt'
if readFile(myFile)=VOID then --checks to see if this file exists
thescore = 0
else
thescore = myVariable
closeFile(myFile) -- Close the file
end if
myFile = 0 -- Dispose of the instance
-- minuteman = timescore/60
-- if minuteman < 120 then
-- thescore = 500
-- else if minuteman > 119 and minuteman < 300 then
-- thescore = 400
-- else if minuteman > 299 and minuteman < 600 then
-- thescore = 300
-- else if minuteman > 599 and minuteman < 1200 then
-- thescore = 200
-- else if minuteman > 1199 and minuteman < 2000 then
-- thescore = 150
-- else
-- thescore = 100
-- end if
-- thescore = thescore + oldscore
put thescore into member("holdscore")
if objectP(myFile) then set myFile = 0 --Delete the instance if it already exists
myFile = new(xtra "fileio") -- Create an instance of FileIO
-- openFile (myFile, the moviePath &"info.txt",0)--Open the file with R/W access
openFile (myFile, squam&"infom.txt",0)--Open the file with R/W access
delete(myFile) --deletes the file
-- createFile (myFile, the moviePath &"info.txt") --creates the file again
createFile (myFile, squam&"infom.txt") --creates the file again
-- openFile(myFile,the moviePath &"info.txt",0) --Open the file with R/W access
openFile(myFile, squam&"infom.txt",0) --Open the file with R/W access
-- mySaveString = thescore --puts the contents of the field 'input' into the variable mySaveString
mySaveString = member("holdscore").text
writeString(myFile,mySaveString) --writes text to the file
closeFile(myFile) -- Close the file
myFile = 0 -- Dispose of the instance
-- put minuteman into member ("timedisplay")
--
brassurl = "http://www.medabots.com/rewards/coding/rewards_give.pl?b=kmghoinmuhh"
if thescore > 10000 then
thescore = 9999
end if
if thescore > 0 and thescore <10 then
scoredigits = 1
tempscore = thescore
tempdigits = 1
else if thescore > 9 and thescore <100 then
scoredigits = 2
tempscore = thescore
tempdigits = 2
else if thescore >99 and thescore < 1000 then
scoredigits = 3
tempscore = thescore
tempdigits = 3
else if thescore >999 and thescore < 10000 then
scoredigits = 4
tempscore = thescore
tempdigits = 4
end if
-- Four Figures
if tempdigits = 4 then
if tempscore > 999 and tempscore <2000 then
digit_four = "q"
tempscore = tempscore - 1000
tempdigits = 3
end if
if tempscore > 1999 and tempscore <3000 then
digit_four = "u"
tempscore = tempscore - 2000
tempdigits = 3
end if
if tempscore > 2999 and tempscore <4000 then
digit_four = "j"
tempscore = tempscore - 3000
tempdigits = 3
end if
if tempscore > 3999 and tempscore <5000 then
digit_four = "c"
tempscore = tempscore - 4000
tempdigits = 3
end if
if tempscore > 4999 and tempscore <6000 then
digit_four = "k"
tempscore = tempscore - 5000
tempdigits = 3
end if
if tempscore > 5999 and tempscore <7000 then
digit_four = "b"
tempscore = tempscore - 6000
tempdigits = 3
end if
if tempscore > 6999 and tempscore <8000 then
digit_four = "r"
tempscore = tempscore - 7000
tempdigits = 3
end if
if tempscore > 7999 and tempscore <9000 then
digit_four = "w"
tempscore = tempscore - 8000
tempdigits = 3
end if
if tempscore > 8999 and tempscore <10000 then
digit_four = "n"
tempscore = tempscore - 9000
tempdigits = 3
end if
end if
-- Three Figures
if tempdigits = 3 then
if tempscore < 99 then
digit_three = "x"
tempscore = tempscore
tempdigits = 2
end if
if tempscore > 99 and tempscore <200 then
digit_three = "q"
tempscore = tempscore - 100
tempdigits = 2
end if
if tempscore > 199 and tempscore <300 then
digit_three = "u"
tempscore = tempscore - 200
tempdigits = 2
end if
if tempscore > 299 and tempscore <400 then
digit_three = "j"
tempscore = tempscore - 300
tempdigits = 2
end if
if tempscore > 399 and tempscore <500 then
digit_three = "c"
tempscore = tempscore - 400
tempdigits = 2
end if
if tempscore > 499 and tempscore <600 then
digit_three = "k"
tempscore = tempscore - 500
tempdigits = 2
end if
if tempscore > 599 and tempscore <700 then
digit_three = "b"
tempscore = tempscore - 600
tempdigits = 2
end if
if tempscore > 699 and tempscore <800 then
digit_three = "r"
tempscore = tempscore - 700
tempdigits = 2
end if
if tempscore > 799 and tempscore <900 then
digit_three = "w"
tempscore = tempscore - 800
tempdigits = 2
end if
if tempscore > 899 and tempscore <1000 then
digit_three = "n"
tempscore = tempscore - 900
tempdigits = 2
end if
end if
-- Two Figures
if tempdigits = 2 then
if tempscore < 10 then
digit_two = "x"
tempscore = tempscore
tempdigits = 1
end if
if tempscore > 9 and tempscore <20 then
digit_two = "q"
tempscore = tempscore - 10
tempdigits = 1
end if
if tempscore > 19 and tempscore <30 then
digit_two = "u"
tempscore = tempscore - 20
tempdigits = 1
end if
if tempscore > 29 and tempscore <40 then
digit_two = "j"
tempscore = tempscore - 30
tempdigits = 1
end if
if tempscore > 39 and tempscore <50 then
digit_two = "c"
tempscore = tempscore - 40
tempdigits = 1
end if
if tempscore > 49 and tempscore <60 then
digit_two = "k"
tempscore = tempscore - 50
tempdigits = 1
end if
if tempscore > 59 and tempscore <70 then
digit_two = "b"
tempscore = tempscore - 60
tempdigits = 1
end if
if tempscore > 69 and tempscore <80 then
digit_two = "r"
tempscore = tempscore - 70
tempdigits = 1
end if
if tempscore > 79 and tempscore <90 then
digit_two = "w"
tempscore = tempscore - 80
tempdigits = 1
end if
if tempscore > 89 and tempscore <100 then
digit_two = "n"
tempscore = tempscore - 90
tempdigits = 1
end if
end if
-- One Figure
if tempdigits = 1 then
if tempscore = 0 then
digit_one = "x"
else if tempscore = 1 then
digit_one = "q"
else if tempscore = 2 then
digit_one = "u"
else if tempscore = 3 then
digit_one = "j"
else if tempscore = 4 then
digit_one = "c"
else if tempscore = 5 then
digit_one = "k"
else if tempscore = 6 then
digit_one = "b"
else if tempscore = 7 then
digit_one = "r"
else if tempscore = 8 then
digit_one = "w"
else if tempscore = 9 then
digit_one = "n"
end if
end if
if scoredigits = 1 then
finalcode = digit_one
else if scoredigits = 2 then
finalcode = digit_two&digit_one
else if scoredigits = 3 then
finalcode = digit_three&digit_two&digit_one
else if scoredigits = 4 then
finalcode = digit_four&digit_three&digit_two&digit_one
end if
-- put brassurl&finalcode into member("urldisplay")
gotobrassurl = brassurl&finalcode
end